Skip to content

Fixed broken CLI guard#8

Merged
jamius19 merged 1 commit into
mainfrom
bugfix/cli-entry-guard
Jun 18, 2026
Merged

Fixed broken CLI guard#8
jamius19 merged 1 commit into
mainfrom
bugfix/cli-entry-guard

Conversation

@jamius19

@jamius19 jamius19 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

Bug Fixes

  • Fixed CLI entry point detection for globally installed packages to properly handle symlinked installations.

@jamius19 jamius19 merged commit 80de31f into main Jun 18, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
βš™οΈ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 4f5ecaac-8a0e-41dd-8a56-90d2caa4e313

πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between f70b8f1 and e36a20f.

πŸ“’ Files selected for processing (1)
  • src/cli.ts

πŸ“ Walkthrough

Walkthrough

src/cli.ts adds an import of realpathSync from node:fs and updates the CLI entry-point check to resolve process.argv[1] through realpathSync before comparing it (via pathToFileURL) to import.meta.url, replacing the previous unresolved comparison.

Changes

Symlink-aware CLI entry detection

Layer / File(s) Summary
Symlink-resolved CLI entry check
src/cli.ts
Imports realpathSync from node:fs and rewrites isCli to call realpathSync(entry) before the pathToFileURL comparison against import.meta.url.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

πŸ‡ A symlink once fooled me, I'll admit with a sigh,
The path wasn't real β€” just a pointer nearby.
But realpathSync came and untangled the thread,
Now the true file is found, not a shortcut instead.
Hop hop, the CLI knows just where it should be! 🌿

✨ Finishing Touches
πŸ“ Generate docstrings
  • Create stacked PR
  • Commit on current branch
πŸ§ͺ Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bugfix/cli-entry-guard

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.

πŸ“’ Thoughts on this report? Let us know!

@jamius19 jamius19 deleted the bugfix/cli-entry-guard branch June 19, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant